package com.jy.adscm.wechat.service.impl;

import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.jy.adscm.utils.AdscmBaseUtils;
import com.jy.adscm.wechat.bean.ShCustomerInfo;
import com.jy.adscm.wechat.mapper.mysql.ShCustomerInfoMapper;
import com.jy.adscm.wechat.service.ShCustomerInfoService;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author zyl
 * @since 2019-09-24
 */
@Service
public class ShCustomerInfoServiceImpl extends ServiceImpl<ShCustomerInfoMapper, ShCustomerInfo> implements ShCustomerInfoService {

    @Override
    public List<ShCustomerInfo> selectShCustomerInfo(String keyWords) {
        Wrapper<ShCustomerInfo> wrapper=new EntityWrapper<>();
        if (AdscmBaseUtils.getInstance().isNotEmpty(keyWords,null)){
            wrapper.like("name",keyWords);
        }
        List<ShCustomerInfo> shCustomerInfos = super.selectList(wrapper);
        return shCustomerInfos;
    }
}
